﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ZoomBar2007;

namespace ZoomBarTest
{
    public partial class Form1 : Form
    {
        private ZoomBarStripItem m_zoomBarStripItem;
        public Form1()
        {
            InitializeComponent();
            m_zoomBarStripItem = new ZoomBarStripItem();
            m_zoomBarStripItem.PositionChanged += new EventHandler(item_PositionChanged);
            m_zoomBarStripItem.Size = new Size(141,21);
            m_zoomBarStripItem.AutoSize = false;
            statusStrip1.Items.Add(m_zoomBarStripItem);

            zoomBar1.PositionChanged += new EventHandler(zoomBar1_PositionChanged);
        }

        void zoomBar1_PositionChanged(object sender, EventArgs e)
        {
            m_zoomBarStripItem.Position = zoomBar1.Position;
            this.Text = "ZoomBar2007 " + Math.Round(zoomBar1.Position).ToString();
        }

        void item_PositionChanged(object sender, EventArgs e)
        {
            zoomBar1.Position = m_zoomBarStripItem.Position;
        }
    }
}
